This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to use Short Name paths on windows?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2006
04:53 PM
How to use Short Name paths on windows?
I have to add some files to the location of a directory I get from the registry but I noticed that the path can use the windows shortened path as in:
C:\Sia782\WEBCL~1\BIN\ssceosrv.DLL
I need to put some files in that BIN directory!
Anyone know how I can do that, maybe in a custom action!
The files get installed to the Install directory then I need to copy 2 files to from the install dir to C:\Sia782\WEBCL~1\BIN
Thanks,
Tom
C:\Sia782\WEBCL~1\BIN\ssceosrv.DLL
I need to put some files in that BIN directory!
Anyone know how I can do that, maybe in a custom action!
The files get installed to the Install directory then I need to copy 2 files to from the install dir to C:\Sia782\WEBCL~1\BIN
Thanks,
Tom
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2006
06:09 PM
The Win32Service interface has a getShortPath method that might be of use; searching these forums for getShortPath should turn up an example or two...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2006
06:55 PM
You should copy the files to the long pathname, not the short pathname, since technically speaking, the short pathname is not unique (ie its possible that the installer will run on a system where the shortpath name of your desired directory is "C:\Sia782\WEBCL~2\BIN", etc.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 07, 2006
08:47 AM
I think you guys mis-understood my question!
I know I need to copy the files to the Long path name because I tried to copy it to the short name and it didn't work!
The registry entry has the Short Name - how do I get the Long Name from the Short Name?
I've seen the LongPathToShort class on this site and it uses a getShortPath method, I thought there might be a getLongPath method of the win32service but there isn't - at least I couldn't find it!
Is there a way of doing this? Or is there a copy action that can take the short path string?
Thanks,
Tom
I know I need to copy the files to the Long path name because I tried to copy it to the short name and it didn't work!
The registry entry has the Short Name - how do I get the Long Name from the Short Name?
I've seen the LongPathToShort class on this site and it uses a getShortPath method, I thought there might be a getLongPath method of the win32service but there isn't - at least I couldn't find it!
Is there a way of doing this? Or is there a copy action that can take the short path string?
Thanks,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 07, 2006
08:56 AM
I haven't tried it for a while: do the file-copy operations not work with a short path?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 07, 2006
10:44 AM
Thanks Robert - didn't even think to try it copy-file operation but it worked!
If anyone cares;
Used a get reg value action;
then in a custom action:
String regpath = arg0.resolveString("$W(REGPATH)");
File f = new File(regpath);
File path = f.getParent();
arg0.getServices().getISDatabase().setVariableValue("REGPATH", path);
set Copy File source = $V(REGPATH)
then used the copy
If anyone cares;
Used a get reg value action;
then in a custom action:
String regpath = arg0.resolveString("$W(REGPATH)");
File f = new File(regpath);
File path = f.getParent();
arg0.getServices().getISDatabase().setVariableValue("REGPATH", path);
set Copy File source = $V(REGPATH)
then used the copy
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 07, 2006
10:52 AM
I should leave well enough alone, but how about a no-code version:
$N($W(REGPATH)\..\)
(get the path, add a final backslash to trick it into thinking it's a directory, referring to the parent with ..\, then normalizing it)...?
$N($W(REGPATH)\..\)
(get the path, add a final backslash to trick it into thinking it's a directory, referring to the parent with ..\, then normalizing it)...?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 07, 2006
01:05 PM
No - thats great because I not only needed to copy files to the Bin dir also to another depending on if it was a siebel client or server!
Then see which one exists!
Thanks again!
String siebelServer = arg0.resolveString("$N($W(SIEBEL_PATH.value)/../../webmaster)");
String siebelClient = arg0.resolveString("$N($W(SIEBEL_PATH.value)/../../public/enu)");
Then see which one exists!
Thanks again!